import {BaseCrudApi} from "~/api/util/BaseService";
import {Permission, UrlVO} from "~/api/system/permission/types";
import {reactive} from "vue";

export class PermissionApi extends BaseCrudApi<Permission> {
    baseUrl: string = "/system/permission";

    urlState = reactive<{ data: UrlVO[] }>({
        data: [],
    });

   async getPermission() {
       const res  = await this.get<UrlVO[]>("/getPermission");
       if (res.data) {
           this.urlState.data = res.data;
       }
    }
}
